Skip to content

Update file opening method for UTF-8 support and add DeepSeek option#234

Open
hc00125 wants to merge 2 commits intohuggingface:mainfrom
hc00125:my-update
Open

Update file opening method for UTF-8 support and add DeepSeek option#234
hc00125 wants to merge 2 commits intohuggingface:mainfrom
hc00125:my-update

Conversation

@hc00125
Copy link
Copy Markdown

@hc00125 hc00125 commented May 6, 2026

This pull request introduces several improvements and updates across the codebase, primarily focusing on enhanced support for DeepSeek models, improved file encoding practices, and better cross-platform compatibility for file locking. The most significant changes are grouped below:

1. DeepSeek Model Support and Routing

  • Added DeepSeek models (openai/deepseek-v4-flash, openai/deepseek-v4-pro) to the SUGGESTED_MODELS list in model_switcher.py, making them available for selection.
  • Updated the logic in _should_replay_thinking_state to recognize DeepSeek models in addition to Anthropic, ensuring correct handling of replayed thinking metadata.

2. File Encoding Consistency

  • Standardized all file read/write operations to use UTF-8 encoding in the following files and functions:
    • manager.py (_load_system_prompt)
    • session.py (save_trajectory_local, update_local_save_status) [1] [2]
    • session_uploader.py (_write_row_payload, _write_claude_code_payload, _read_session_file, _update_upload_status) [1] [2] [3] [4]

3. Cross-Platform File Locking

  • Improved file locking logic in session_uploader.py to check for the presence of fcntl (which is unavailable on Windows), allowing the code to run on more platforms without errors. [1] [2] [3]

4. Testing

  • Added a new test in test_litellm.py that loads environment variables and runs a completion using the DeepSeek chat model, verifying integration.

Copilot AI review requested due to automatic review settings May 6, 2026 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant